"""Lead note Pydantic schemas."""

from __future__ import annotations

from typing import Any

from pydantic import Field

from ..schemas.base import ORMBase, TimestampModel


class LeadNoteBase(ORMBase):
    """Base LeadNote schema."""

    summary: str = Field(..., min_length=1, description="Communication summary")
    expectation: str | None = Field(None, description="Customer expectations")
    attachments: dict[str, Any] | None = None


class LeadNoteCreate(LeadNoteBase):
    """Schema for creating a lead note."""

    lead_id: int
    author_id: int


class LeadNoteUpdate(ORMBase):
    """Schema for updating a lead note."""

    summary: str | None = Field(None, min_length=1)
    expectation: str | None = None
    attachments: dict[str, Any] | None = None


class LeadNoteOut(LeadNoteBase, TimestampModel):
    """Schema for lead note output."""

    id: int
    lead_id: int
    author_id: int
